.PHONY: vector stack queue loop_queue test_queue deque node help 

all: help vector stack queue loop_queue test_queue deque node

vector: vector.c vector_test.c
	gcc -o vector vector.c vector_test.c && ./vector && rm -f ./vector

stack: stack.c vector.c stack_test.c
	gcc -o stack stack.c vector.c stack_test.c && ./stack && rm -f ./stack

queue: queue.c vector.c queue_test.c
	gcc -o queue queue.c vector.c queue_test.c && ./queue && rm -f ./queue

loop_queue: loop_queue.c loop_queue_test.c
	gcc -o loop_queue loop_queue.c loop_queue_test.c && ./loop_queue && rm -f ./loop_queue

test_queue: loop_queue.c queue.c vector.c test_queue.c
	gcc -o test_queue loop_queue.c queue.c vector.c test_queue.c && ./test_queue && rm -f ./test_queue

deque: deque.c deque_test.c 
	gcc -o deque deque.c deque_test.c && ./deque && rm -f ./deque

list_node: list_node.c list_node_test.c
	gcc -o list_node list_node.c list_node_test.c && ./list_node && rm -f ./list_node

help: 
	@echo " > vector     动态数组"
	@echo " > stack      栈"
	@echo " > queue      队列"
	@echo " > loop_queue 循环队列"
	@echo " > test_queue 测试数组队列和循环队列性能"
	@echo " > deque      双端队列"
	@echo " > node       链表"